home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / src / pvmmagic.h < prev    next >
C/C++ Source or Header  |  1997-07-22  |  3KB  |  109 lines

  1.  
  2. /* $Id: pvmmagic.h,v 1.2 1997/06/25 22:11:08 pvmsrc Exp $ */
  3.  
  4. /*
  5.  *         PVM version 3.4:  Parallel Virtual Machine System
  6.  *               University of Tennessee, Knoxville TN.
  7.  *           Oak Ridge National Laboratory, Oak Ridge TN.
  8.  *                   Emory University, Atlanta GA.
  9.  *      Authors:  J. J. Dongarra, G. E. Fagg, M. Fischer
  10.  *          G. A. Geist, J. A. Kohl, R. J. Manchek, P. Mucci,
  11.  *         P. M. Papadopoulos, S. L. Scott, and V. S. Sunderam
  12.  *                   (C) 1997 All Rights Reserved
  13.  *
  14.  *                              NOTICE
  15.  *
  16.  * Permission to use, copy, modify, and distribute this software and
  17.  * its documentation for any purpose and without fee is hereby granted
  18.  * provided that the above copyright notice appear in all copies and
  19.  * that both the copyright notice and this permission notice appear in
  20.  * supporting documentation.
  21.  *
  22.  * Neither the Institutions (Emory University, Oak Ridge National
  23.  * Laboratory, and University of Tennessee) nor the Authors make any
  24.  * representations about the suitability of this software for any
  25.  * purpose.  This software is provided ``as is'' without express or
  26.  * implied warranty.
  27.  *
  28.  * PVM version 3 was funded in part by the U.S. Department of Energy,
  29.  * the National Science Foundation and the State of Tennessee.
  30.  */
  31.  
  32. /*
  33.  * pvmmagic.h
  34.  *
  35.  *    magic numbers for pvm data structures. 
  36.  *
  37.  */
  38.  
  39.  
  40. /* Magic #'s  are segmented by use (magic segment)
  41.  * Each segment defines it own use (magic category) 
  42. */
  43.  
  44. #ifndef __PVMMAGIC_H__
  45.  
  46. #define __PVMMAGIC_H__
  47.  
  48. typedef unsigned int PVMMAGIC;
  49.  
  50. #define MAGIC_SEGSHIFT 15
  51. #define MAGICMASK     0xffff     
  52.  
  53. #define BADMAGIC(_ref,_test) ((_ref)!=(_test) ? 1 : 0)
  54.                                               
  55.                                     
  56.  
  57. #define MAKE_MAGIC(_seg, _cat) ((((_seg) & MAGICMASK) << 15 ) \
  58.                                 | ((_cat) & MAGICMASK))
  59.  
  60. /* ------- Define magic segments ---------- */
  61. /* Segment numbers should not change in a release. */
  62. /* They can be added to */
  63.  
  64. #define MG_DDPRO_SEG        1
  65. #define MG_GLOBAL_SEG        2
  66. #define MG_HOST_SEG            3
  67. #define MG_IMALLOC_SEG        4
  68. #define MG_LPVM_SEG            5
  69. #define MG_LPVMCAT_SEG        6
  70. #define MG_LPVMGEN_SEG        7
  71. #define MG_LPVMGLOB_SEG        8
  72. #define MG_LPVMMIMD_SEG        9
  73. #define MG_LMSG_SEG            10
  74. #define MG_LPVMPACK_SEG        11
  75. #define MG_LPVMSHMEM_SEG    12
  76. #define MG_MSGBOX_SEG        13
  77. #define MG_NMDCLASS_SEG        14
  78. #define MG_PKT_SEG            15
  79. #define MG_PMSG_SEG            16
  80. #define MG_PVMALLOC_SEG        17
  81. #define MG_PVMCRUFT_SEG        18
  82. #define MG_PVMD_SEG            19
  83. #define MG_PVMDABUF_SEG        20
  84. #define MG_PVMDPACK_SEG        21
  85. #define MG_PVMDSHMEM_SEG    22
  86. #define MG_PVMDTEV_SEG        23
  87. #define MG_PVMDUNIX_SEG        24
  88. #define MG_PVMERR_SEG        25
  89. #define MG_PVMFRAG_SEG        26
  90. #define MG_PVMLOG_SEG        27
  91. #define MG_PVMSHMEM_SEG        28
  92. #define MG_SDPRO_SEG        29
  93. #define MG_TASK_SEG            30
  94. #define MG_TDPROC_SEG        31
  95. #define MG_TEV_SEG            32
  96. #define MG_WAITC_SEG        33
  97.  
  98.  
  99. /* ----- Magic Categories ------- */
  100. /* -- MG_LMSG_SEG -- */
  101.  
  102. #define LMSG_MSGID    MAKE_MAGIC(MG_LMSG_SEG,1) 
  103.  
  104.  
  105. /* ------ END of Magic Categories ----------- */
  106.  
  107. #endif /* ifndef __PVMMAGIC__ */
  108.  
  109.